<div class="sixteen columns">
    <h1 class="page-title">Kết quả xổ số  <span class="loading"><img src="/files/img/loader_2.gif"/></span>
    <span class="line"></span></h1>
</div>

<div class="sixteen columns">
<style type="text/css">

    .outer {
      border: 1px solid #DDDDDD;
    }
    .outer td {
        border-bottom: 1px solid #DDDDDD;
        line-height: 20px;
        padding: 8px;
        text-align: left;
        vertical-align: top;
    }
    .inner{
        width: 100%;
    }
    .inner td {
        border: none;
        padding: 10px 0px;
        text-align: center;
    }
    td.left {
        font-size: 1.1em;
        vertical-align: middle;
        border-right: 1px solid #DDDDDD;
    }
    td.right {
        padding: 10px;
        text-align: center;
        font-size: 1.2em;
        vertical-align: middle;
        font-weight: bold;
    }
    
    .two{
        font-size: 1.4em; font-weight: bold;
    }
    .l{

        border-right: 1px solid #DDDDDD;
    }
    .loading{
        display: none;
        margin-left: 20px;
        vertical-align: -5px;
    }

</style>

<div id="content">
    <?php //echo $this->renderPartial('content', array('date' => $date, 'results' => $results, 'results2' => $results2, 'db' => $db))?>
</div>

<script>
$(function(){
    $('.loading').fadeIn('fast'); 
    $.post('<?php echo $this->createUrl('/web/xoso/ajax')?>', function(data){
        if(data != null){
            $('#content').html(data);
        }
        $('.loading').fadeOut('fast'); 
    });
    
    setInterval(function(){
        
        var t = new Date();
        var m = t.getMinutes();
        var h = t.getHours();
        
        if(h == 18 && m <= 45){
            $('.loading').fadeIn('fast'); 
            $.post('<?php echo $this->createUrl('/tool/xoso/ajax')?>', function(data){
                if(data == null || data == '') return false;
                
                $('#content').html(data);
                $('.loading').fadeOut('fast'); 
            });
        }
        console.log(h +':'+ m);

    }, 5000);
})

</script>
</div>
